package com.qianqian.service.exception;

public class BusinessException extends RuntimeException {

    public BusinessException(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }
    public BusinessException(BusinessError businessError) {
        this.code = businessError.getErrorCode();
        this.msg = businessError.getMsg();
    }

    private int code;
    private String msg;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
